const preType: any = {
  // 预览类型(部分类型在预览之前已转换成pdf格式)
  ".xlsx": "application/pdf",
  ".xls": "application/pdf",
  ".docx": "application/pdf",
  ".doc": "application/pdf",
  ".pdf": "application/pdf",
  ".tif": "application/pdf",

  ".ofd": "application/ofd",

  ".gif": "image/gif",
  ".jpeg": "image/jpeg",
  ".jpg": "image/jpeg",
  ".bmp": "image/bmp",
  ".png": "image/png",

  ".mp4": "video/mp4",
  ".wmv": "video/mp4",
  ".avi": "video/mp4",
  ".asf": "video/mp4",
  ".asx": "video/mp4",
  ".rm": "video/mp4",
  ".rmvb": "video/mp4",
  ".3gp": "video/mp4",
  ".mov": "video/mp4",
  ".m4v": "video/mp4",
  ".dat": "video/mp4",
  ".mkv": "video/mp4",
  ".flv": "video/mp4",
  ".vob": "video/mp4",
  ".webm": "video/mp4",
  ".3g2": "video/mp4",
  ".mpg": "video/mp4",
  ".ogv": "video/mp4",
  ".m2ts": "video/mp4",
  ".swf": "video/mp4",

  ".mp3": "audio/mp3",
  ".wav": "audio/x-wav",
  ".ogg": "audio/mp3",
  ".aac": "audio/mp3",
  ".wma": "audio/mp3",
  ".flac": "audio/mp3",
  ".m4a": "audio/mp3",
  ".mka": "audio/mp3",
  ".opus": "audio/mp3",

  ".xml": "application/xml",
  ".html": "text/html",
  ".htm": "text/html",
  ".json": "application/json",
  ".txt": "text/plain"
};
const imgType = ["image/gif", "image/jpeg", "image/jpg", "image/png", "image/bmp"];
const videoType = ["video/mp4", "video/x-msvideo"];
const xmlType = ["application/xml", "application/json", "text/html"];
const jsonType = ["application/json"];
const txtType = ["text/plain"];
const audioType = ["audio/mpeg", "audio/mp3", "audio/x-wav"];
const pdfType = ["application/pdf"];
const ofdType = ["application/ofd"];
const downloadType = {
  ".doc": "application/msword",
  ".docx": "application/msword",
  ".bin": "application/octet-stream",
  ".exe": "application/octet-stream",
  ".so": "application/octet-stream",
  ".dll": "application/octet-stream",
  ".tif": "application/octet-stream",
  ".pdf": "application/pdf",
  ".ai": "application/postscript",
  ".xls": "application/vnd.ms-excel",
  ".xlsx": "application/vnd.ms-excel",
  ".ppt": "application/vnd.ms-powerpoint",
  ".dir": "application/x-director",
  ".js": "application/x-javascript",
  ".swf": "application/x-shockwave-flash",
  ".xhtml": "application/xhtml+xml",
  ".xht": "application/xhtml+xml",
  ".zip": "application/zip",
  ".mid": "audio/midi",
  ".midi": "audio/midi",
  ".mp3": "audio/mpeg",
  ".rm": "audio/x-pn-realaudio",
  ".rpm": "audio/x-pn-realaudio-plugin",
  ".wav": "audio/x-wav",
  ".bmp": "image/bmp",
  ".gif": "image/gif",
  ".jpeg": "image/jpeg",
  ".jpg": "image/jpeg",
  ".png": "image/png",
  ".css": "text/css",
  ".html": "text/html",
  ".htm": "text/html",
  ".txt": "text/plain",
  ".xsl": "text/xml",
  ".xml": "application/xml",
  ".mpeg": "video/mpeg",
  ".mpg": "video/mpeg",
  ".avi": "video/x-msvideo",
  ".movie": "video/x-sgi-movie",
  ".mp4": "video/mp4",
  ".json": "application/json"
};
export { preType, downloadType, imgType, videoType, audioType, xmlType, txtType, pdfType, jsonType, ofdType };
